<html>

<head>
    <script>
        external.onclose = function () {
            return true;
        }
    </script>
</head>

<body>
    <div id="app">close-directly.html</div>
</body>

</html>